package ru.home.documentmanager.model.dto;

import ru.home.documentmanager.model.UserData;

public class UserDataDTO {

    private String firstName;

    private String lastName;

    private String patronymic;

    private long passport;

    public UserDataDTO() {

    }

    public UserDataDTO(UserData userData) {
        firstName = userData.getFirstName();
        lastName = userData.getLastName();
        patronymic = userData.getPatronymic();
        passport = userData.getPassportNumber();
    }

    public UserData createUserData() {
        UserData userData = new UserData();
        userData.setFirstName(firstName);
        userData.setLastName(lastName);
        userData.setPatronymic(patronymic);
        userData.setPassportNumber(passport);
        return userData;
    }

    public void fillUserData(UserData userData) {
        userData.setFirstName(firstName);
        userData.setLastName(lastName);
        userData.setPatronymic(patronymic);
        userData.setPassportNumber(passport);
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String getPatronymic() {
        return patronymic;
    }

    public void setPatronymic(String patronymic) {
        this.patronymic = patronymic;
    }

    public long getPassport() {
        return passport;
    }

    public void setPassport(long passport) {
        this.passport = passport;
    }

}
